package cn.lijun.dlxc.JPAEntity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * 当前类名称: ${DESCRIPTION}
 * 当前类所属的包: cn.lijun.dlxc.JPAEntity
 * 当前类所属项目: dlxc
 * 编辑工具IntelliJ IDEA
 *
 * @作者时间: GZ-LIJUN-2017-01-16 20:15
 **/
@Entity
@Table(name = "elec_text", schema = "dlxc", catalog = "")
public class ElecTextEntity
{
    private String textId;
    private String textName;
    private Timestamp textDate;
    private String textRemark;

    @Id
    @Column(name = "textID", nullable = false, length = 50)
    public String getTextId()
    {
        return textId;
    }

    public void setTextId(String textId)
    {
        this.textId = textId;
    }

    @Basic
    @Column(name = "textName", nullable = true, length = 50)
    public String getTextName()
    {
        return textName;
    }

    public void setTextName(String textName)
    {
        this.textName = textName;
    }

    @Basic
    @Column(name = "textDate", nullable = true)
    public Timestamp getTextDate()
    {
        return textDate;
    }

    public void setTextDate(Timestamp textDate)
    {
        this.textDate = textDate;
    }

    @Basic
    @Column(name = "textRemark", nullable = true, length = 500)
    public String getTextRemark()
    {
        return textRemark;
    }

    public void setTextRemark(String textRemark)
    {
        this.textRemark = textRemark;
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ElecTextEntity that = (ElecTextEntity) o;

        if (textId != null ? !textId.equals(that.textId) : that.textId != null) return false;
        if (textName != null ? !textName.equals(that.textName) : that.textName != null) return false;
        if (textDate != null ? !textDate.equals(that.textDate) : that.textDate != null) return false;
        if (textRemark != null ? !textRemark.equals(that.textRemark) : that.textRemark != null) return false;

        return true;
    }

    @Override
    public int hashCode()
    {
        int result = textId != null ? textId.hashCode() : 0;
        result = 31 * result + (textName != null ? textName.hashCode() : 0);
        result = 31 * result + (textDate != null ? textDate.hashCode() : 0);
        result = 31 * result + (textRemark != null ? textRemark.hashCode() : 0);
        return result;
    }
}
